package com.tangyuan.video.feign;

import com.tangyuan.feignapis.video.IVideoHotFeignClient;
import com.tangyuan.model.VideoHot;
import com.tangyuan.video.service.IVideoHotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/feignApi/videoHot")
public class VideoHotClient implements IVideoHotFeignClient {

    @Autowired
    IVideoHotService videoHotService;

    @GetMapping("/selectByOrderNo/{outTradeNo}")
    @Override
    public VideoHot selectByOrderNo(@PathVariable String outTradeNo) {
        return videoHotService.selectByOrderNo(outTradeNo);
    }
    @PostMapping("/updateById")
    @Override
    public void updateById(VideoHot videoHot) {
        videoHotService.updateById(videoHot);
    }

    @PostMapping("/browseHot")
    @Override
    public void browseHot(Long movieId) {
        videoHotService.browseHot(movieId);
    }

}
